$OpenBSD: patch-configure_ac,v 1.17 2015/07/20 20:16:59 ajacoutot Exp $

GTK_DOC_CHECK chunk:
Remove when updating to a newer release with integrated bsd_auth(3) support.

From 074df27827fd773f1c76545cd08da568440ca41f Mon Sep 17 00:00:00 2001
From: Antoine Jacoutot <ajacoutot@gnome.org>
Date: Sun, 19 Jul 2015 02:19:08 +0200
Subject: Add support for OpenBSD

--- configure.ac.orig	Fri Jun 19 22:31:02 2015
+++ configure.ac	Sun Jul 19 02:18:31 2015
@@ -46,7 +46,7 @@ AC_PATH_PROG([XSLTPROC], [xsltproc])
 fi
 AM_CONDITIONAL(MAN_PAGES_ENABLED, test x$enable_man_pages = xyes)
 
-GTK_DOC_CHECK([1.3])
+dnl GTK_DOC_CHECK([1.3])
 
 #### gcc warning flags
 
@@ -167,11 +167,15 @@ fi
 dnl ---------------------------------------------------------------------------
 dnl - Check whether setnetgrent has a return value
 dnl ---------------------------------------------------------------------------
+AC_CHECK_HEADERS([netgroup.h])
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-	#include <stddef.h>
-	#include <netdb.h>
-]], [[
-	int r = setnetgrent (NULL);]])],
+    #include <stddef.h>
+    #ifdef HAVE_NETGROUP_H
+    #include <netgroup.h>
+    #else
+    #include <netdb.h>
+    #endif
+]], [[int r = setnetgrent (NULL);]])],
 [AC_DEFINE([HAVE_SETNETGRENT_RETURN], 1, [Define to 1 if setnetgrent has return value])])
 
 dnl ---------------------------------------------------------------------------
@@ -318,6 +322,11 @@ case $POLKIT_AUTHFW in
     AC_DEFINE(POLKIT_AUTHFW_SHADOW, 1, [If using the Shadow authentication framework])
     ;;
 
+  bsdauth)
+    need_pam=no
+    AC_DEFINE(POLKIT_AUTHFW_BSDAUTH, 1, [If using the bsd_auth(3) authentication framework])
+    ;;
+
   *)
     AC_MSG_ERROR([Unknown Authentication Framework: $POLKIT_AUTHFW])
     ;;
@@ -326,6 +335,7 @@ esac
 AM_CONDITIONAL(POLKIT_AUTHFW_NONE, [test x$POLKIT_AUTHFW = xnone], [Using no authfw])
 AM_CONDITIONAL(POLKIT_AUTHFW_PAM, [test x$POLKIT_AUTHFW = xpam], [Using PAM authfw])
 AM_CONDITIONAL(POLKIT_AUTHFW_SHADOW, [test x$POLKIT_AUTHFW = xshadow], [Using Shadow authfw])
+AM_CONDITIONAL(POLKIT_AUTHFW_BSDAUTH, [test x$POLKIT_AUTHFW = xbsdauth], [Using bsd_auth(3) authfw])
 
 
 dnl ---------------------------------------------------------------------------
@@ -504,6 +514,9 @@ case "$host_os" in
 	;;
   *freebsd*)
   	AC_DEFINE([HAVE_FREEBSD], 1, [Is this a FreeBSD system?])
+	;;
+  *openbsd*)
+	AC_DEFINE([HAVE_OPENBSD], 1, [Is this an OpenBSD system?])
 	;;
 esac
 
